﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="OrganizationMgmView.aspx.cs" Inherits="Skynet.WebSite.Administration.OrganizationMgmView" %>
<%@ Register Assembly="Infrastructure.Web" Namespace="Infrastructure.Web.Controls" TagPrefix="cc2"   %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AjaxContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="gvOrganizations" runat="server" 
        DataSourceID="odsOrganizations" 
        onselectedindexchanged="gvOrganizations_SelectedIndexChanged" Width="100%">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="odsOrganizations" runat="server" 
        DataObjectTypeName="Skynet.BusinessEntities.Organization" 
        DeleteMethod="DeleteOrganization" InsertMethod="AddOrganization" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetOrganizations" 
        TypeName="Skynet.WebAdministracion.Views.OrganizationMgmView.OrganizationMgmPresenter" 
        UpdateMethod="UpdateOrganization"></asp:ObjectDataSource>
    <br />
    <asp:DetailsView ID="dvorganization" runat="server" AutoGenerateRows="False" 
        DataSourceID="odsWorkOrganization" DefaultMode="Insert" Height="50px" 
        Width="125px">
        <Fields>
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                Visible="False" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:ObjectDataSource ID="odsWorkOrganization" runat="server" 
        DataObjectTypeName="Skynet.BusinessEntities.Organization" 
        DeleteMethod="DeleteOrganization" InsertMethod="AddOrganization" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetOrganization" 
        TypeName="Skynet.WebAdministracion.Views.OrganizationMgmView.OrganizationMgmPresenter" 
        UpdateMethod="UpdateOrganization">
        <SelectParameters>
            <asp:ControlParameter ControlID="dvorganization" DbType="Guid" Name="Id" 
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
